{$CLEO .cs}

$Sweet_Car = 0
023C: load_special_actor 'psycho' as 5 // models 290-299
038B: load_requested_models
1@ = audiostream.Load3D("cleo\battle_maps\luigitacodead.mp3")
audiostream.Loop(1@,1)
2@ = audiostream.Load3D("cleo\battle_maps\luigidies.wav")
//audiostream.Loop(2@,1)
:respawn
7@ = 0
0@ = actor.Create(23, #SPECIAL05,  3749.1013, -1054.1849, 1631.668)
actor.Angle(0@) =   73.6498
actor.Health(0@) = 2000
0638: AS_actor 0@ stay_put 1
077C: clear_actor 0@ acquaintance 4 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 3 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 2 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 1 to_all_pedtypes // see ped.dat

32@ = 0

audiostream.PerformAction(1@, play)
Audiostream.LinkToActor(1@,0@)

Audiostream.LinkToActor(2@,0@)
060A: create_decision_maker_type 0 store_to 11@ // decision\allowed\m_.ped files
0978: copy_decision_maker 11@ to 9@
060B: set_actor 0@ decision_maker_to 9@

0446: set_actor 0@ dismemberment_possible 0    
33@ = 0
actor.SetWalkStyle(0@ , "player")
0296: unload_special_actor 5

:start_random
wait 0
0209: 18@ = random_int_in_ranges 0 5

wait 0
0209: 18@ = random_int_in_ranges 0 5
if
18@ == 0 
then
00A1: put_actor 0@ at  4038.5798 -989.6423 40.0866
actor.Angle(0@) = 91.0108
jump @main
end
if
18@ == 1 
then
00A1: put_actor 0@ at  3998.8101 -988.2686 45.6642
actor.Angle(0@) =    271.0108
jump @main
end
if
18@ == 2
then
00A1: put_actor 0@ at  4007.4277 -877.2221 35.7088
actor.Angle(0@) = 194.7196
jump @main
end
if
18@ == 3
then
00A1: put_actor 0@ at  4106.8774 -875.2241 38.498
actor.Angle(0@) = 200.9746 
jump @main
end
if
18@ == 4
then
00A1: put_actor 0@ at   4099.4121 -967.8796 32.2087
actor.Angle(0@) =  271.5588
jump @main
end

jump @start_random

:main
wait 0
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1

04C4: store_coords_to  3@ 4@ 5@  from_actor 0@ with_offset 0.0 0.0 0.0
gosub @random
if  and 
7@ == 0
actor.Dead(0@)
then
audiostream.PerformAction(1@,stop)   
audiostream.PerformAction(2@, play)
$Sweet_Car += 1
7@ = 1
32@ = 0
0948: create_explosion_at  3@ 4@ 5@ type 11 camera_shake 3.0
0337: set_actor 0@ visibility 0
0619: enable_actor 0@ collision_detection 0
jump @respawn  
end
if
  $actor_sweet == 0
then


0A92: create_custom_thread "battle_maps\gang_house\luigi_bots.cs"  
jump @goto
end
if
 $onmission == 0 
then
:goto
audiostream.Release(2@)
 audiostream.Release(1@)
actor.DestroyInstantly(0@)


0A93: end_custom_thread 
end_thread
end

if  and
32@ > 8000
7@ == 1
then
jump @respawn 
jump @goto
end
jump @main

    {
:get
0209: 17@ = random_int_in_ranges 0 3
if
17@ == 0
then
0AE1: 30@ = random_actor_near_point 3@ 4@ 5@ in_radius 30.0 find_next 1 pass_deads 1

end
if
17@ == 1
then
30@ = actor.EmulateFromPlayer($PLAYER_CHAR)
end
if
17@ == 2
then

if
056D:   actor $second_player_actor  defined

then
30@ = actor.EmulateFromPlayer($second_player)
end
end
return
         }

:random
0209: 12@ = random_int_in_ranges 0 200

if
12@ == 3
then
0446: set_actor 0@ dismemberment_possible 0
end
if
12@ == 14
then
0446: set_actor 0@ dismemberment_possible 1
end
if
12@ == 121
then
08AF: set_actor 0@ max_health_to 1

actor.Health(0@) = 1
end
if
12@ == 90
then
//actor.Health(0@) = 1000
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 128
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 177
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 128
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 111
then
0446: set_actor 0@ dismemberment_possible 0


end
if
12@ == 81
then
0446: set_actor 0@ dismemberment_possible 0


end
return